package com.gomyb.common.base;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.log4j.Log4j2;

/**
 * @author <a href="mailto:HelloHeSir@gmail.com">HeC</a>
 * @date 2018/12/11 11:11
 */
@Log4j2
@Getter
@Setter
public class BaseException extends RuntimeException {

    private String msg;

    public BaseException(String message) {
        super(message);
        this.msg = message;
    }

    public BaseException(String message,Throwable cause) {
        super(message,cause);
        this.msg = message;
    }

    public static void throwException(String message){
        throw new BaseException(message);
    }

    public static void throwException(String message,Throwable cause){
        throw new BaseException(message,cause);
    }

}